package com.blog.common.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 资源
 * </p>
 *
 * @author Valerie
 * @since 2023-03-11
 */
@Getter
@Setter
@TableName("tb_resource")
@ApiModel(value = "Resource对象", description = "资源")
@Deprecated
public class Resource implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("资源名")
    @TableField("resource_name")
    private String resourceName;

    @ApiModelProperty("权限路径")
    @TableField("url")
    private String url;

    @ApiModelProperty("请求方式")
    @TableField("request_method")
    private String requestMethod;

    @ApiModelProperty("父权限id")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty("是否匿名访问 0否 1是")
    @TableField("is_anonymous")
    private Boolean isAnonymous;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("1 删除 0 未删除")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;
}
